#!/bin/sh

set -x
CC_PREFIX=/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29
export PATH=$CC_PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$CC_PREFIX/lib:$LD_LIBRARY_PATH
set +x

export ARCH=mips
export CROSS_COMPILE=mips-linux-gnu-



if [ -z $1 ]; then
  make

elif [ $1 = "build" ]; then
  make

elif [ $1 = "clean" ]; then
  make clean

fi
